import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
    state: () => ({
        permissions: ['*:*:*'],  // 默认超级管理员权限
        role: 'admin',
        username: 'guest'
    }),
    actions: {
        // 临时模拟权限数据
        mockPermissions() {
            this.permissions = [
                'system:user:add',
                'system:user:edit',
                'system:user:query'
            ]
        }
    }
})